﻿CREATE PROCEDURE [dbo].[SelectTypeSynonyms]
	@types intlist readonly
AS

select eft.EntityID, s.Syno, s.ID
from @types t 
inner join EntityFBTypes eft on eft.FBTypeID = t.value
inner join SynonymEntities se on se.EntityID = eft.EntityID and se.IsActive = 1
inner join Synonyms s on s.ID = se.SynoID
